library(fitplc2)
set.seed(123)
SX0 <- 30
PX0 <- 2
X <- 50
xx <- seq(0.01, 5, length = 100)
yy <- fweibull(xx, SX0, PX0, X=50)
yy2 <- rnorm(100, yy, 0.01)
dat <- tibble(relK = yy2, WP = xx) %>%
filter(relK > 0 & relK < 1) %>%
mutate(PLC = 100 - 100 * relK)
dat## # A tibble: 99 x 3
## relK WP PLC
## <dbl> <dbl> <dbl>
## 1 0.994 0.01 0.568
## 2 0.996 0.0604 0.392
## 3 0.992 0.161 0.812
## 4 0.987 0.212 1.28
## 5 0.997 0.262 0.318
## 6 0.977 0.312 2.29
## 7 0.952 0.363 4.81
## 8 0.949 0.413 5.11
## 9 0.942 0.464 5.81
## 10 0.948 0.514 5.16
## # … with 89 more rows
\[ PLC = \frac{K_{max} - K}{K_{max}} \cdot 100 \]
where \(K\) is raw conductance, \(K_{max}\) is the maximum value of \(K\).
\[ \frac{K}{K_{max}} = \Biggl(1 - \frac{X}{100}\Biggr)^{\Biggl[{\biggl(\frac{P}{P_X}}\biggr)^{\frac{P_X S_X}{V}}\Biggr]} \]
\[ V = (X-100)\text{ln}\Biggl(1-\frac{X}{100}\Biggr) \]
where \(P_X\) is the xylem pressure (P) where X% of the conductivity is lost, \(S_X\) is the derivative (% MPa-1) at X (e.g. \(S_{50}\) is the slope of the curve at \(P_{50}\)).
## Class of object 'plcfit' as returned by 'fitplc'.
## -------------------------------------------------
##
## Parameters and %s%% confidence interval:
##
## 95% Estimate Norm - 2.5% Norm - 97.5% Boot - 2.5% Boot - 97.5%
## SX 29.858981 29.586862 30.13437 29.570310 30.193488
## PX 2.000767 1.991328 2.01020 1.990307 2.009014
\[ P = \Biggl[\frac{\text{ln}K}{\text{ln}\bigl(1-\frac{X}{100}\bigr)}\Biggr]^{\frac{V}{P_X S_X}} P_X \]
fit2 <- fitplc2::fitplc(dat,
model = "Inv_Weibull",
varnames = c(PLC = "PLC", WP = "WP"),
nboot=100)
fit2## Class of object 'plcfit' as returned by 'fitplc'.
## -------------------------------------------------
##
## Parameters and %s%% confidence interval:
##
## 95% Estimate Norm - 2.5% Norm - 97.5% Boot - 2.5% Boot - 97.5%
## SX 29.845611 29.569021 30.13129 29.36082 30.335142
## PX 2.004632 1.980742 2.02845 1.98900 2.015076
\[ K = \frac{1}{1 + exp(a(P - b))} \]
where \(a\) and \(b\) are constants.
fit3 <- fitplc2::fitplc(dat,
model = "nls_sigmoidal",
varnames = c(PLC = "PLC", WP = "WP"),
nboot=100)
fit3## Class of object 'plcfit' as returned by 'fitplc'.
## -------------------------------------------------
##
## Parameters and %s%% confidence interval:
##
## 95% Estimate Norm - 2.5% Norm - 97.5% Boot - 2.5% Boot - 97.5%
## SX 32.171341 31.060857 33.281825 31.104104 33.259805
## PX 2.093105 2.064374 2.121836 2.072157 2.124412
\[ P = \frac{log(\frac{1}{K} - 1)}{a} + b \]
fit4 <- fitplc2::fitplc(dat,
model = "Inv_nls_sigmoidal",
varnames = c(PLC = "PLC", WP = "WP"),
nboot=100)
fit4## Class of object 'plcfit' as returned by 'fitplc'.
## -------------------------------------------------
##
## Parameters and %s%% confidence interval:
##
## 95% Estimate Norm - 2.5% Norm - 97.5% Boot - 2.5% Boot - 97.5%
## SX 38.134968 35.921749 40.348187 33.675849 42.539186
## PX 2.349362 2.268337 2.430388 2.259403 2.449051
Duursma R.A., Choat B. 2017. fitplc - an R package to fit hydraulic vulnerability curves. Journal of Plant Hydraulics. doi:10.20870/jph.2017.e002
Ogle, K. , Barber, J. J., Willson, C. and Thompson, B. 2009, Hierarchical statistical modeling of xylem vulnerability to cavitation. New Phytologist, 182: 541-554. doi:10.1111/j.1469-8137.2008.02760.x
Pammenter NW, Van der Willigen CV. 1998. A mathematical and statistical analysis of the curves illustrating vulnerability of xylem to cavitation. Tree Physiology 18: 589–593. https://doi.org/10.1093/treephys/18.8-9.589